import Vue from 'vue'
import VueRouter from 'vue-router'
//登陆页
import Login from '../views/login/index.vue'
//布局页面
import Layout from '../views/Layout/index.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'home',
    component: Login
  },
  {
    path: '/wel',
    component: Layout,
  },
  //物料数据
  {
    path: '/material/materialList/index',
    component: Layout,
    //物料主数据
    children: [{
      path: '/',
      name: '物料主数据',
      component: () =>
        import('@/views/material/materialList/index.vue')
    }]
  },
  {
    path: '/material/materialClass/index',
    component: Layout,
     //物料分类
    children: [{
      path: '/',
      name: '物料分类',
      component: () =>
        import('@/views/material/materialClass/index.vue')
    }]
  },
  {
    path: '/material/units/index',
    component: Layout,
     //计量单位换算
    children: [{
      path: '/',
      name: '计量单位主数据',
      component: () =>
        import('@/views/material/units/index.vue')
    }]
  },
  {
    path: '/material/unitsConvert/index',
    component: Layout,
     //计量单位换算
    children: [{
      path: '/',
      name: '计量单位换算',
      component: () =>
        import('@/views/material/unitsConvert/index')
    }]
  },
  //客户主数据
  {
    path: '/base/customer/index',
    component: Layout,
     //客户主数据
    children: [{
      path: '/',
      name: '客户主数据',
      component: () =>
        import('@/views/base/customer/index')
    }]
  },
  {
    path: '/base/supplier/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '供应商主数据',
      component: () =>
        import('@/views/base/supplier/index')
    }]
  },
  {
    path: '/masterData/shipperInformation/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '货主信息',
      component: () =>
        import('@/views/masterData/shipperInformation/index')
    }]
  },
  {
    path: '/wms/outsourcingProcess/outsourcedSuppliers/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '外协供应商管理',
      component: () =>
        import('@/views/wms/outsourcingProcess/outsourcedSuppliers/index')
    }]
  },
  {
    path: '/factory/foctoryList/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '外协供应商管理',
      component: () =>
        import('@/views/factory/foctoryList/index')
    }]
  },
  {
    path: '/base/personnelMasterData/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '人员主数据',
      component: () =>
        import('@/views/base/personnelMasterData/index')
    }]
  },
  {
    path: '/teamGroup/workingShift/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '班组管理',
      component: () =>
        import('@/views/teamGroup/workingShift/index')
    }]
  },
  {
    path: '/teamGroup/userSkill/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '人员管理',
      component: () =>
        import('@/views/teamGroup/userSkill/index')
    }]
  },
  {
    path: '/teamGroup/skillData/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '技能信息',
      component: () =>
        import('@/views/teamGroup/skillData/index')
    }]
  },
  {
    path: '/teamGroup/workgroup/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '班组信息',
      component: () =>
        import('@/views/teamGroup/workgroup/index')
    }]
  },
  {
    path: '/masterData/wareHouse/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '线边仓建模',
      component: () =>
        import('@/views/masterData/wareHouse/index')
    }]
  },
  {
    path: '/process/standardProcess/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '标准工序',
      component: () =>
        import('@/views/process/standardProcess/index')
    }]
  },
  {
    path: '/process/processLine/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '标准工艺路线',
      component: () =>
        import('@/views/process/processLine/index')
    }]
  },
  {
    path: '/process/bomOld/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: 'Bom管理',
      component: () =>
        import('@/views/process/bomOld/index')
    }]
  },
  {
    path: '/masterData/organization/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '基地主数据',
      component: () =>
        import('@/views/masterData/organization/index')
    }]
  },
  {
    path: '/teamGroup/workCalendar/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '工厂日历',
      component: () =>
        import('@/views/teamGroup/workCalendar/index')
    }]
  },
  {
    path: '/masterData/dep/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '组织架构管理',
      component: () =>
        import('@/views/masterData/dep/index')
    }]
  },
  {
    path: '/masterData/newWarehouse/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '仓库信息',
      component: () =>
        import('@/views/masterData/newWarehouse/index')
    }]
  },
  {
    path: '/masterData/newWarehouseArea/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '库区信息',
      component: () =>
        import('@/views/masterData/newWarehouseArea/index')
    }]
  },
  {
    path: '/masterData/newWarehouseLocation/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '库区信息',
      component: () =>
        import('@/views/masterData/newWarehouseLocation/index')
    }]
  },
  {
    path: '/equipment/list/main/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '库区信息',
      component: () =>
        import('@/views/equipment/list/main/index')
    }]
  },
  {
    path: '/equipment/maintain/config/index',
    component: Layout,
     //供应商数据
    children: [{
      path: '/',
      name: '库区信息',
      component: () =>
        import('@/views/equipment/maintain/config/index')
    }]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
